3.9.60 \(\int (a+b x)^n (c+d x) \, dx\)

Optimal. Leaf size=46 \[ \frac {(b c-a d) (a+b x)^{n+1}}{b^2 (n+1)}+\frac {d (a+b x)^{n+2}}{b^2 (n+2)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {43} \begin {gather*} \frac {(b c-a d) (a+b x)^{n+1}}{b^2 (n+1)}+\frac {d (a+b x)^{n+2}}{b^2 (n+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^n*(c + d*x),x]

[Out]

((b*c - a*d)*(a + b*x)^(1 + n))/(b^2*(1 + n)) + (d*(a + b*x)^(2 + n))/(b^2*(2 + n))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int (a+b x)^n (c+d x) \, dx &=\int \left (\frac {(b c-a d) (a+b x)^n}{b}+\frac {d (a+b x)^{1+n}}{b}\right ) \, dx\\ &=\frac {(b c-a d) (a+b x)^{1+n}}{b^2 (1+n)}+\frac {d (a+b x)^{2+n}}{b^2 (2+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 41, normalized size = 0.89 \begin {gather*} \frac {(a+b x)^{n+1} (-a d+b c (n+2)+b d (n+1) x)}{b^2 (n+1) (n+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^n*(c + d*x),x]

[Out]

((a + b*x)^(1 + n)*(-(a*d) + b*c*(2 + n) + b*d*(1 + n)*x))/(b^2*(1 + n)*(2 + n))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.03, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x)^n (c+d x) \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x)^n*(c + d*x),x]

[Out]

Defer[IntegrateAlgebraic][(a + b*x)^n*(c + d*x), x]

________________________________________________________________________________________

fricas [A]  time = 1.47, size = 83, normalized size = 1.80 \begin {gather*} \frac {{\left (a b c n + 2 \, a b c - a^{2} d + {\left (b^{2} d n + b^{2} d\right )} x^{2} + {\left (2 \, b^{2} c + {\left (b^{2} c + a b d\right )} n\right )} x\right )} {\left (b x + a\right )}^{n}}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c),x, algorithm="fricas")

[Out]

(a*b*c*n + 2*a*b*c - a^2*d + (b^2*d*n + b^2*d)*x^2 + (2*b^2*c + (b^2*c + a*b*d)*n)*x)*(b*x + a)^n/(b^2*n^2 + 3
*b^2*n + 2*b^2)

________________________________________________________________________________________

giac [B]  time = 1.25, size = 132, normalized size = 2.87 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b^{2} d n x^{2} + {\left (b x + a\right )}^{n} b^{2} c n x + {\left (b x + a\right )}^{n} a b d n x + {\left (b x + a\right )}^{n} b^{2} d x^{2} + {\left (b x + a\right )}^{n} a b c n + 2 \, {\left (b x + a\right )}^{n} b^{2} c x + 2 \, {\left (b x + a\right )}^{n} a b c - {\left (b x + a\right )}^{n} a^{2} d}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c),x, algorithm="giac")

[Out]

((b*x + a)^n*b^2*d*n*x^2 + (b*x + a)^n*b^2*c*n*x + (b*x + a)^n*a*b*d*n*x + (b*x + a)^n*b^2*d*x^2 + (b*x + a)^n
*a*b*c*n + 2*(b*x + a)^n*b^2*c*x + 2*(b*x + a)^n*a*b*c - (b*x + a)^n*a^2*d)/(b^2*n^2 + 3*b^2*n + 2*b^2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 49, normalized size = 1.07 \begin {gather*} -\frac {\left (-b d n x -b c n -b d x +a d -2 b c \right ) \left (b x +a \right )^{n +1}}{\left (n^{2}+3 n +2\right ) b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n*(d*x+c),x)

[Out]

-(b*x+a)^(n+1)*(-b*d*n*x-b*c*n-b*d*x+a*d-2*b*c)/b^2/(n^2+3*n+2)

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 63, normalized size = 1.37 \begin {gather*} \frac {{\left (b^{2} {\left (n + 1\right )} x^{2} + a b n x - a^{2}\right )} {\left (b x + a\right )}^{n} d}{{\left (n^{2} + 3 \, n + 2\right )} b^{2}} + \frac {{\left (b x + a\right )}^{n + 1} c}{b {\left (n + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c),x, algorithm="maxima")

[Out]

(b^2*(n + 1)*x^2 + a*b*n*x - a^2)*(b*x + a)^n*d/((n^2 + 3*n + 2)*b^2) + (b*x + a)^(n + 1)*c/(b*(n + 1))

________________________________________________________________________________________

mupad [B]  time = 1.19, size = 88, normalized size = 1.91 \begin {gather*} {\left (a+b\,x\right )}^n\,\left (\frac {a\,\left (2\,b\,c-a\,d+b\,c\,n\right )}{b^2\,\left (n^2+3\,n+2\right )}+\frac {x\,\left (2\,b^2\,c+b^2\,c\,n+a\,b\,d\,n\right )}{b^2\,\left (n^2+3\,n+2\right )}+\frac {d\,x^2\,\left (n+1\right )}{n^2+3\,n+2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^n*(c + d*x),x)

[Out]

(a + b*x)^n*((a*(2*b*c - a*d + b*c*n))/(b^2*(3*n + n^2 + 2)) + (x*(2*b^2*c + b^2*c*n + a*b*d*n))/(b^2*(3*n + n
^2 + 2)) + (d*x^2*(n + 1))/(3*n + n^2 + 2))

________________________________________________________________________________________

sympy [A]  time = 0.85, size = 377, normalized size = 8.20 \begin {gather*} \begin {cases} a^{n} \left (c x + \frac {d x^{2}}{2}\right ) & \text {for}\: b = 0 \\\frac {a d \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} + \frac {a d}{a b^{2} + b^{3} x} - \frac {b c}{a b^{2} + b^{3} x} + \frac {b d x \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} & \text {for}\: n = -2 \\- \frac {a d \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {c \log {\left (\frac {a}{b} + x \right )}}{b} + \frac {d x}{b} & \text {for}\: n = -1 \\- \frac {a^{2} d \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {a b c n \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {2 a b c \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {a b d n x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} c n x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {2 b^{2} c x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} d n x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} d x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n*(d*x+c),x)

[Out]

Piecewise((a**n*(c*x + d*x**2/2), Eq(b, 0)), (a*d*log(a/b + x)/(a*b**2 + b**3*x) + a*d/(a*b**2 + b**3*x) - b*c
/(a*b**2 + b**3*x) + b*d*x*log(a/b + x)/(a*b**2 + b**3*x), Eq(n, -2)), (-a*d*log(a/b + x)/b**2 + c*log(a/b + x
)/b + d*x/b, Eq(n, -1)), (-a**2*d*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2) + a*b*c*n*(a + b*x)**n/(b**2*n*
*2 + 3*b**2*n + 2*b**2) + 2*a*b*c*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2) + a*b*d*n*x*(a + b*x)**n/(b**2*
n**2 + 3*b**2*n + 2*b**2) + b**2*c*n*x*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2) + 2*b**2*c*x*(a + b*x)**n/
(b**2*n**2 + 3*b**2*n + 2*b**2) + b**2*d*n*x**2*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2) + b**2*d*x**2*(a
+ b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2), True))

________________________________________________________________________________________